package com.sudo.dao.admin.model.bo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 为道日损 2020-06-12 13:32
 * webSite：https://www.sudo.ren
 */
@Data
public class UpdateMyPwdBO {

    @NotBlank(message = "原始密码不能为空")
    @Length(min = 6, max = 10, message = "密码必须由6~10个字符组成")
    @Pattern(regexp="[0-9A-Za-z_]{6,10}",message="密码必须是6~10位数字、字母或下划线")
    private String oldPassword;

    @NotBlank(message = "新密码不能为空")
    @Length(min = 6, max = 10, message = "密码必须由6~10个字符组成")
    @Pattern(regexp="[0-9A-Za-z_]{6,10}",message="密码必须是6~10位数字、字母或下划线")
    private String newPassword;

    @NotBlank(message = "确认密码不能为空")
    @Length(min = 6, max = 10, message = "确认密码必须由4~10个字符组成")
    @Pattern(regexp="[0-9A-Za-z_]{6,10}",message="确认密码必须是6~10位数字、字母或下划线")
    private String confirmPassword;

}
